package com.ljx.network;

import okhttp3.FormBody;
import okhttp3.RequestBody;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-05-13  14:34
 */
public class MainServer {

    public static void main(String[] args) {
        handleLogin();
    }

    /**
     * 登录
     */
    public static void handleLogin(){
        String url = "http://10.23.2.4/eportal/InterFace.do?method=login";
        RequestBody requestBody = new FormBody.Builder()
                .add("userId", "")  // 填写账号
                .add("password", "")  // 填写密码
                .add("service", "%E5%AE%9C%E5%AE%BE%E7%A7%BB%E5%8A%A8")  // 运营商（需要URL解析后的结果）
                .add("queryString", "") // 查询字符串
                .add("passwordEncrypt", "false")
                .add("operatorPwd", "")
                .add("operatorUserId", "")
                .add("validcode", "")
                .build();
        HttpUtil.doPost(url, requestBody);
    }

    /**
     * 退出登录
     */
    public static void logout(){

    }
}
